﻿	<div id='panel_head'>
	<% if (session[:user_id] == @people.id) %>
		<h2 id='panel_name'>
			<%= link_to panel.panelName, {:controller => :user_admin, :action => 'edit_panel', :id => panel}, 
																		:class => "plus", :title => "edit" %>
		</h2>

		<span><%= link_to "logout #{@people.userName}", { :controller => :login, :action => :logout } %></span>
	<% else %>
		<h2 id='panel_name'><%= panel.panelName %></h2>
	<% end %>
		<ul id='panel_set'>
	<% if (session[:user_id] == @people.id) %>
			<li>
				<%= link_to '×', {:controller => :user_admin, :action => 'delete_panel', :id => panel}, 
													:class => "x", :title => "delete" %>
			</li>					
			<li>
				<%= link_to '+', {:controller => :user_admin, :action => 'add_panel', :id => panel.user},
													:class => "modi" %>
			</li>
	<% end %>
			<li>
				<%= will_paginate @panels %>
			</li>				
			<li>
				<%= link_to "tree view",{:controller => :tree, :action => :index, :id => @people.userName} %>
			</li>
		</ul>
		

	</div><!--end of div panelHead-->
	
		
	<div id='panel_body' class="box">
<% if (session[:user_id] == @people.id) %>
	<%= link_to 'create new table', {	:controller => :user_admin, :action => 'add_table',	:id => panel}, 
																			:class => "align_right" %>
<% end %>	
		<%= render( :controller => :user_admin, 
								:partial => "table", 
								:collection => panel.tables) %>
	</div><!--end of panelBody-->


